<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="WeeklyStatus.aspx.cs" Inherits="WeeklyStatus" Title="Tackle - Weekly Status (Product)" %>

<%@ MasterType VirtualPath="~/MasterPage.master" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentHolder" runat="Server">
    <strong>Weekly Status<br />
        <br />
    </strong><span style="font-size: x-small"><span style="font-size: 8pt">Select the last
        day of the week for the status report:</span><br />
        <br />
    </span>
    <table width="98%" cellpadding="4" cellspacing="0">
        <tr>
            <td bgcolor="#e3eaeb" colspan="2" style="border-right: silver 1px ridge; border-top: silver 1px ridge;
                border-left: silver 1px ridge; border-bottom: silver 1px ridge" valign="top">
                <span style="font-size: x-small">Sprint: </span>
                <asp:DropDownList ID="ddSprintSelection" runat="server" AutoPostBack="True" DataSourceID="dsGetSprintNames"
                    DataTextField="SprintName" DataValueField="SprintID" Font-Size="X-Small" OnDataBound="ddSprintSelection_DataBound"
                    Font-Names="Verdana">
                </asp:DropDownList></td>
        </tr>
        <tr>
            <td valign="top" rowspan="2">
                <span style="font-size: x-small"></span>
                <asp:Calendar ID="calEntryDate" runat="server" BackColor="#E3EAEB" DayNameFormat="FirstTwoLetters"
                    FirstDayOfWeek="Monday" Font-Size="X-Small" OnSelectionChanged="calEntryDate_SelectionChanged"
                    OnVisibleMonthChanged="calEntryDate_VisibleMonthChanged">
                    <WeekendDayStyle BackColor="White" />
                </asp:Calendar>
                </td>
            <td rowspan="2" valign="top">
                <rsweb:ReportViewer ID="repViewWeeklyStatus" runat="server" Font-Names="Verdana"
                    Font-Size="8pt" Height="375px" Width="100%">
                    <LocalReport ReportPath="WeeklyStatus.rdlc">
                        <DataSources>
                            <rsweb:ReportDataSource DataSourceId="odsRemainingWork" Name="DataSet1_RemainingWork" />
                            <rsweb:ReportDataSource DataSourceId="odsSprintInfo" Name="DataSet1_SprintInformationForStatus" />
                            <rsweb:ReportDataSource DataSourceId="dsBurnDownChart" Name="DataSet1_GenerateBurnDownChart" />
                            <rsweb:ReportDataSource DataSourceId="odsTaskWorkCompleted" Name="DataSet1_CompletedWork" />
                            <rsweb:ReportDataSource DataSourceId="odsScrumTeamPrefs" Name="DataSet1_ScrumTeamPrefs" />
                        </DataSources>
                    </LocalReport>
                </rsweb:ReportViewer>
                <asp:ObjectDataSource ID="odsTaskWorkCompleted" runat="server" OldValuesParameterFormatString="original_{0}"
                    SelectMethod="GetData" TypeName="DataSet1TableAdapters.CompletedWorkTableAdapter">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="calEntryDate" DefaultValue="" Name="StartDate" PropertyName="SelectedDate"
                            Type="DateTime" ConvertEmptyStringToNull="False" />
                        <asp:ControlParameter ControlID="ddSprintSelection" Name="SprintID" PropertyName="SelectedValue"
                            Type="Int32" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                <asp:ObjectDataSource ID="odsRemainingWork" runat="server" OldValuesParameterFormatString="original_{0}"
                    SelectMethod="GetData" TypeName="DataSet1TableAdapters.RemainingWorkTableAdapter">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="ddSprintSelection" Name="SprintID" PropertyName="SelectedValue"
                            Type="Int32" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                <asp:ObjectDataSource ID="odsSprintInfo" runat="server" OldValuesParameterFormatString="original_{0}"
                    SelectMethod="GetData" TypeName="DataSet1TableAdapters.SprintInformationForStatusTableAdapter">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="ddSprintSelection" Name="SprintID" PropertyName="SelectedValue"
                            Type="Int32" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                <asp:SqlDataSource ID="dsBurnDownChart" runat="server" ConnectionString="<%$ ConnectionStrings:TackleConnectionStringMain %>"
                    SelectCommand="GenerateBurnDownChart" SelectCommandType="StoredProcedure">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="ddSprintSelection" DefaultValue="-1" Name="SprintID"
                            PropertyName="SelectedValue" Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>
                <asp:ObjectDataSource ID="odsScrumTeamPrefs" runat="server" OldValuesParameterFormatString="original_{0}"
                    SelectMethod="GetData" TypeName="DataSet1TableAdapters.ScrumTeamPrefsTableAdapter">
                    <SelectParameters>
                        <asp:SessionParameter Name="ScrumTeamID" SessionField="ScrumTeamID" Type="Int32" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                &nbsp; &nbsp;
            </td>
        </tr>
        <tr>
        </tr>
        <tr>
        </tr>
    </table>
    <span style="font-size: x-small">
        <asp:SqlDataSource ID="dsGetSprintNames" runat="server" ConnectionString="<%$ ConnectionStrings:TackleConnectionStringMain %>"
            SelectCommand="SELECT DISTINCT tblMasterBacklogSchedule.SprintName, tblMasterBacklogSchedule.EndDate, tblSprint.SprintID FROM tblSprint LEFT OUTER JOIN tblSprintBacklog ON tblSprint.SprintID = tblSprintBacklog.fSprintID RIGHT OUTER JOIN tblMasterBacklogSchedule ON tblSprint.fMasterBacklogScheduleID = tblMasterBacklogSchedule.MasterBacklogScheduleID WHERE (tblMasterBacklogSchedule.fScrumTeamID = @ScrumTeamID) AND (tblSprintBacklog.fSprintID IS NOT NULL) ORDER BY tblMasterBacklogSchedule.EndDate DESC">
            <SelectParameters>
                <asp:SessionParameter Name="ScrumTeamID" SessionField="ScrumTeamID" />
            </SelectParameters>
        </asp:SqlDataSource>
    </span>
</asp:Content>
